package com.tensquare.sms.service;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.util.Map;

@Component
@RabbitListener(queues = "nanjingsms")
public class SmsListener {
    @RabbitHandler
    public void getMsg(Map<String,String> msg) {
        System.out.println("接收到的验证码是："+msg);
        // 将该信息使用阿里或腾讯 短信推送到客户手机上
    }
}
